﻿@model ProductModel
@{
    //resources for product tags input
    Html.AppendCssFileParts("~/Content/tagit/jquery.tagit.css");
    Html.AppendScriptParts("~/Scripts/tag-it.min.js");
}
@using Nop.Core.Domain.Catalog;
@using Nop.Services.Catalog;
@using System.Text;
<script type="text/javascript">
    $(document).ready(function() {

        @if (!Model.IsLoggedInAsVendor)
        {
            <text>$("#@Html.FieldIdFor(model => model.ShowOnHomePage)").click(toggleShowOnHomePage);</text>
        }
        $("#@Html.FieldIdFor(model => model.ProductTypeId)").change(toggleProductType);
        $("#@Html.FieldIdFor(model => model.RequireOtherProducts)").click(toggleRequireOtherProducts);
        $("#@Html.FieldIdFor(model => model.AvailableForPreOrder)").click(togglePreOrder);
        $("#@Html.FieldIdFor(model => model.IsGiftCard)").click(toggleGiftCard);
        $("#@Html.FieldIdFor(model => model.CustomerEntersPrice)").click(toggleCustomerEntersPrice);
        $("#@Html.FieldIdFor(model => model.IsDownload)").click(toggleDownloadableProduct);
        $("#@Html.FieldIdFor(model => model.UnlimitedDownloads)").click(toggleDownloadableProduct);
        $("#@Html.FieldIdFor(model => model.HasSampleDownload)").click(toggleDownloadableProduct);
        $("#@Html.FieldIdFor(model => model.HasUserAgreement)").click(toggleDownloadableProduct);
        $("#@Html.FieldIdFor(model => model.IsRecurring)").click(toggleRecurring);
        $("#@Html.FieldIdFor(model => model.IsRental)").click(toggleRental);
        $("#@Html.FieldIdFor(model => model.IsShipEnabled)").click(toggleShipping);
        $("#@Html.FieldIdFor(model => model.IsTaxExempt)").click(toggleTax);
        $("#@Html.FieldIdFor(model => model.ManageInventoryMethodId)").change(toggleManageStock);
        $("#@Html.FieldIdFor(model => model.UseMultipleWarehouses)").click(toggleManageStock);
        $("#@Html.FieldIdFor(model => model.BackorderModeId)").change(toggleManageStock);
        $("#@Html.FieldIdFor(model => model.DisplayStockAvailability)").click(toggleManageStock);

        @if (!Model.IsLoggedInAsVendor)
        {
            <text>toggleShowOnHomePage();</text>
        }
        toggleProductType();
        togglePreOrder();
        toggleRequireOtherProducts();
        toggleGiftCard();
        toggleCustomerEntersPrice();
        toggleDownloadableProduct();
        toggleRecurring();
        toggleRental();
        toggleShipping();
        toggleTax();
        toggleManageStock();
    });

    function toggleShowOnHomePage() {
        if ($('#@Html.FieldIdFor(model => model.ShowOnHomePage)').is(':checked')) {
            $('#pnlDisplayOrder').show();
        } else {
            $('#pnlDisplayOrder').hide();
        }
    }

    function toggleProductType() {
        var selectedProductTypeId = $("#@Html.FieldIdFor(model => model.ProductTypeId)").val();
        if (selectedProductTypeId == @(((int) ProductType.SimpleProduct).ToString())) {
            $('#group-prices').show();
            $('#group-required-other-products').show();
            $('#group-giftcard').show();
            $('#group-downloads').show();
            $('#group-recurring').show();
            $('#group-rental').show();
            $('#group-shipping').show();
            $('#group-tax').show();
            $('#group-inventory').show();
            $('#tab-associated-products').hide();
        } else if (selectedProductTypeId == @(((int) ProductType.GroupedProduct).ToString())) {
            $('#group-prices').hide();
            $('#group-required-other-products').hide();
            $('#group-giftcard').hide();
            $('#group-downloads').hide();
            $('#group-recurring').hide();
            $('#group-rental').hide();
            $('#group-shipping').hide();
            $('#group-tax').hide();
            $('#group-inventory').hide();
            $('#tab-associated-products').show();
        }
    }

    function togglePreOrder() {
        if ($('#@Html.FieldIdFor(model => model.AvailableForPreOrder)').is(':checked')) {
            $('#pnlPreOrderAvailabilityStartDateTimeUtc').show();
        } else {
            $('#pnlPreOrderAvailabilityStartDateTimeUtc').hide();
        }
    }

    function toggleRequireOtherProducts() {
        if ($('#@Html.FieldIdFor(model => model.RequireOtherProducts)').is(':checked')) {
            $('#pnlRequiredProductIds').show();
            $('#pnlAutomaticallyAddRequiredProducts').show();
        } else {
            $('#pnlRequiredProductIds').hide();
            $('#pnlAutomaticallyAddRequiredProducts').hide();
        }
    }

    function toggleGiftCard() {
        if ($('#@Html.FieldIdFor(model => model.IsGiftCard)').is(':checked')) {
            $('#pnlGiftCardType').show();
        } else {
            $('#pnlGiftCardType').hide();
        }
    }

    function toggleCustomerEntersPrice() {
        if ($('#@Html.FieldIdFor(model => model.CustomerEntersPrice)').is(':checked')) {
            $('#pnlMinimumCustomerEnteredPrice').show();
            $('#pnlMaximumCustomerEnteredPrice').show();
        } else {
            $('#pnlMinimumCustomerEnteredPrice').hide();
            $('#pnlMaximumCustomerEnteredPrice').hide();
        }
    }

    function toggleDownloadableProduct() {
        if ($('#@Html.FieldIdFor(model => model.IsDownload)').is(':checked')) {

            $('#pnlDownloadFile').show();
            $('#pnlUnlimitedDownloads').show();
            if ($('#@Html.FieldIdFor(model => model.UnlimitedDownloads)').is(':checked')) {
                $('#pnlMaxNumberOfDownloads').hide();
            } else {
                $('#pnlMaxNumberOfDownloads').show();
            }
            $('#pnlDownloadExpirationDays').show();
            $('#pnlDownloadActivationType').show();

            $('#pnlHasUserAgreement').show();
            if ($('#@Html.FieldIdFor(model => model.HasUserAgreement)').is(':checked')) {
                $('#pnlUserAgreementText').show();
            } else {
                $('#pnlUserAgreementText').hide();
            }

            $('#pnlHasSampleDownload').show();

            if ($('#@Html.FieldIdFor(model => model.HasSampleDownload)').is(':checked')) {
                $('#pnlSampleDownloadFile').show();
            } else {
                $('#pnlSampleDownloadFile').hide();
            }
        } else {
            $('#pnlDownloadFile').hide();
            $('#pnlUnlimitedDownloads').hide();
            $('#pnlMaxNumberOfDownloads').hide();
            $('#pnlDownloadExpirationDays').hide();
            $('#pnlDownloadActivationType').hide();
            $('#pnlHasUserAgreement').hide();
            $('#pnlUserAgreementText').hide();
            $('#pnlHasSampleDownload').hide();
            $('#pnlSampleDownloadFile').hide();
        }
    }

    function toggleShipping() {
        if ($('#@Html.FieldIdFor(model => model.IsShipEnabled)').is(':checked')) {
            $('#pnlFreeShipping').show();
            $('#pnlShipSeparately').show();
            $('#pnlAdditionalShippingCharge').show();
            $('#pnlWeight').show();
            $('#pnlLength').show();
            $('#pnlWidth').show();
            $('#pnlHeight').show();
            $('#pnlDeliveryDate').show();
        } else {
            $('#pnlFreeShipping').hide();
            $('#pnlShipSeparately').hide();
            $('#pnlAdditionalShippingCharge').hide();
            $('#pnlWeight').hide();
            $('#pnlLength').hide();
            $('#pnlWidth').hide();
            $('#pnlHeight').hide();
            $('#pnlDeliveryDate').hide();
        }
    }

    function toggleRecurring() {
        if ($('#@Html.FieldIdFor(model => model.IsRecurring)').is(':checked')) {
            $('#pnlCycleLength').show();
            $('#pnlCyclePeriod').show();
            $('#pnlTotalCycles').show();
        } else {
            $('#pnlCycleLength').hide();
            $('#pnlCyclePeriod').hide();
            $('#pnlTotalCycles').hide();
        }
    }

    function toggleRental() {
        if ($('#@Html.FieldIdFor(model => model.IsRental)').is(':checked')) {
            $('#pnlRentalPriceLength').show();
            $('#pnlRentalPricePeriod').show();
        } else {
            $('#pnlRentalPriceLength').hide();
            $('#pnlRentalPricePeriod').hide();
        }
    }

    function toggleTax() {
        if ($('#@Html.FieldIdFor(model => model.IsTaxExempt)').is(':checked')) {
            $('#pnlTaxCategory').hide();
        } else {
            $('#pnlTaxCategory').show();
        }
    }

    function toggleManageStock() {
        var selectedManageInventoryMethodId = $("#@Html.FieldIdFor(model => model.ManageInventoryMethodId)").val();
        if (selectedManageInventoryMethodId == @(((int) ManageInventoryMethod.DontManageStock).ToString())) {
            $('#pnlUseMultipleWarehouses').hide();
        $('#pnlWarehouse').show();
        $('#pnlMultipleWarehouses').hide();
        $('#pnlStockQuantity').hide();
        $('#pnlDisplayStockAvailability').hide();
        $('#pnlDisplayStockQuantity').hide();
        $('#pnlMinStockQuantity').hide();
        $('#pnlLowStockActivity').hide();
        $('#pnlNotifyForQuantityBelow').hide();
        $('#pnlAllowBackInStockSubscriptions').hide();
        $('#pnlBackorders').hide();
        $('#pnlAllowAddingOnlyExistingAttributeCombinations').hide();
    } else if (selectedManageInventoryMethodId == @(((int) ManageInventoryMethod.ManageStock).ToString())) {
        $('#pnlUseMultipleWarehouses').show();

        if ($('#@Html.FieldIdFor(model => model.UseMultipleWarehouses)').is(':checked')) {
            $('#pnlWarehouse').hide();
            $('#pnlMultipleWarehouses').show();
            $('#pnlStockQuantity').hide();
        } else {
            $('#pnlWarehouse').show();
            $('#pnlMultipleWarehouses').hide();
            $('#pnlStockQuantity').show();
        }

        $('#pnlDisplayStockAvailability').show();

        if ($('#@Html.FieldIdFor(model => model.DisplayStockAvailability)').is(':checked')) {
            $('#pnlDisplayStockQuantity').show();
        } else {
            $('#pnlDisplayStockQuantity').hide();
        }

        $('#pnlMinStockQuantity').show();
        $('#pnlLowStockActivity').show();
        $('#pnlNotifyForQuantityBelow').show();
        $('#pnlBackorders').show();
        var selectedBackorderModeId = $("#@Html.FieldIdFor(model => model.BackorderModeId)").val();
        if (selectedBackorderModeId == @(((int) BackorderMode.NoBackorders).ToString())) {
            //no backorders
            $('#pnlAllowBackInStockSubscriptions').show();
    } else {
    //backorders are enabled
                $('#pnlAllowBackInStockSubscriptions').hide();
    }
    $('#pnlAllowAddingOnlyExistingAttributeCombinations').hide();
    } else {
        $('#pnlUseMultipleWarehouses').hide();
        $('#pnlWarehouse').show();
        $('#pnlMultipleWarehouses').hide();
        $('#pnlStockQuantity').hide();
        $('#pnlDisplayStockAvailability').hide();
        $('#pnlDisplayStockQuantity').hide();
        $('#pnlMinStockQuantity').hide();
        $('#pnlLowStockActivity').hide();
        $('#pnlNotifyForQuantityBelow').hide();
        $('#pnlAllowBackInStockSubscriptions').hide();
        $('#pnlBackorders').hide();
        $('#pnlAllowAddingOnlyExistingAttributeCombinations').show();
    }
    }

    @{
        //TODO move to Model
        var productTags = EngineContext.Current.Resolve<IProductTagService>().GetAllProductTags();
        var productTagsSb = new StringBuilder();
        productTagsSb.Append("var sampleTags = [");
        for (int i = 0; i < productTags.Count; i++)
        {
            var tag = productTags[i];
            productTagsSb.Append("'");
            productTagsSb.Append(HttpUtility.JavaScriptStringEncode(tag.Name));
            productTagsSb.Append("'");
            if (i != productTags.Count - 1)
            {
                productTagsSb.Append(",");
            }
        }
        productTagsSb.Append("]");
    }
    //product tags
    $(document).ready(function () {
        @Html.Raw(productTagsSb.ToString())
        $("#@Html.FieldIdFor(model => model.ProductTags)").tagit({
            availableTags: sampleTags,
            allowSpaces: true
        });
    });


    //required product friendly names
    $(document).ready(function () {
        loadRequiredProductFriendlyNames();
    });
    $(document).ready(function () {
        $('#@Html.FieldIdFor(model => model.RequiredProductIds)')
        .data('timeout', null)
        .keyup(function() {
            clearTimeout($(this).data('timeout'));
            //one second timeout
            $(this).data('timeout', setTimeout(loadRequiredProductFriendlyNames, 1000));
        });
    });
    function loadRequiredProductFriendlyNames() {
        var inputValue = $('#@Html.FieldIdFor(model => model.RequiredProductIds)').val();
        if (inputValue) {
            //load friendly names
            $('#required-products-check-progress').show();
            $.ajax({
                cache: false,
                type: 'POST',
                url: '@Url.Action("LoadProductFriendlyNames", "Product")',
                data: { "productIds": inputValue },
                dataType: 'json',
                success: function(data) {
                    $('#required-products-check-progress').hide();
                    $('#required-product-names').text(data.Text);
                },
                failure: function () {
                    $('#required-products-check-progress').hide();
                    $('#required-product-names').text('');
                }
            });
        } else {
            $('#required-product-names').text('');
        }
    }

</script>
<table class="adminContent">
    @if (Model.Id > 0)
    {
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.Id):
            </td>
            <td class="adminData">
                @Model.Id.ToString()
                @Html.ValidationMessageFor(model => model.Id)
            </td>
        </tr>
    }
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.ProductTypeId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.ProductTypeId, ((ProductType)Model.ProductTypeId).ToSelectList())
            @Html.ValidationMessageFor(model => model.ProductTypeId)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.VisibleIndividually):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.VisibleIndividually)
            @Html.ValidationMessageFor(model => model.VisibleIndividually)
        </td>
    </tr>
    @if (Model.Id > 0 && Model.AssociatedToProductId > 0)
    {
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AssociatedToProductId):
            </td>
            <td class="adminData">
                @Html.ActionLink(Model.AssociatedToProductName, "Edit", "Product", new { id = Model.AssociatedToProductId }, new { })
            </td>
        </tr>
    }
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.ProductTemplateId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.ProductTemplateId, Model.AvailableProductTemplates)
            @Html.ValidationMessageFor(model => model.ProductTemplateId)
        </td>
    </tr>
</table>
@(Html.LocalizedEditor<ProductModel, ProductLocalizedModel>("product-info-localized",
                @<table class="adminContent">
                    <tr>
                        <td class="adminTitle">
                            @Html.NopLabelFor(model => model.Locales[item].Name):
                        </td>
                        <td class="adminData">
                            @Html.EditorFor(model => model.Locales[item].Name)
                            @Html.ValidationMessageFor(model => model.Locales[item].Name)
                        </td>
                    </tr>
                    <tr>
                        <td class="adminTitle">
                            @Html.NopLabelFor(model => model.Locales[item].ShortDescription):
                        </td>
                        <td class="adminData">
                            @Html.TextAreaFor(model => model.Locales[item].ShortDescription, new { style = "Width: 250px; Height: 150px;" })
                            @Html.ValidationMessageFor(model => model.Locales[item].ShortDescription)
                        </td>
                    </tr>
                    <tr>
                        <td class="adminTitle">
                            @Html.NopLabelFor(model => model.Locales[item].FullDescription):
                        </td>
                        <td class="adminData">
                            @Html.EditorFor(model => model.Locales[item].FullDescription, "RichEditor")
                            @Html.ValidationMessageFor(model => model.Locales[item].FullDescription)
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            @Html.HiddenFor(model => model.Locales[item].LanguageId)
                        </td>
                    </tr>
                </table>
                ,
                @<table class="adminContent">
                    <tr>
                        <td class="adminTitle">
                            @Html.NopLabelFor(model => model.Name):
                        </td>
                        <td class="adminData">
                            @Html.EditorFor(model => model.Name)
                            @Html.ValidationMessageFor(model => model.Name)
                        </td>
                    </tr>
                    <tr>
                        <td class="adminTitle">
                            @Html.NopLabelFor(model => model.ShortDescription):
                        </td>
                        <td class="adminData">
                            @Html.TextAreaFor(x => x.ShortDescription, new { style = "Width: 250px; Height: 150px;" })
                            @Html.ValidationMessageFor(model => model.ShortDescription)
                        </td>
                    </tr>
                    <tr>
                        <td class="adminTitle">
                            @Html.NopLabelFor(model => model.FullDescription):
                        </td>
                        <td class="adminData">
                            @Html.EditorFor(x => x.FullDescription, "RichEditor")
                            @Html.ValidationMessageFor(model => model.FullDescription)
                        </td>
                    </tr>
                </table>
            ))
<table class="adminContent">
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.AdminComment):
        </td>
        <td class="adminData">
            @Html.TextAreaFor(model => model.AdminComment)
            @Html.ValidationMessageFor(model => model.AdminComment)
        </td>
    </tr>
    <tr @(Model.IsLoggedInAsVendor ? Html.Raw("style='display: none;'") : null)>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.VendorId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.VendorId, Model.AvailableVendors)
            @Html.ValidationMessageFor(model => model.VendorId)
        </td>
    </tr>
    <tr @(Model.IsLoggedInAsVendor ? Html.Raw("style='display: none;'") : null)>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.ShowOnHomePage):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.ShowOnHomePage)
            @Html.ValidationMessageFor(model => model.ShowOnHomePage)
        </td>
    </tr>
    <tr id="pnlDisplayOrder" @(Model.IsLoggedInAsVendor ? Html.Raw("style='display: none;'") : null)>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.DisplayOrder):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.DisplayOrder)
            @Html.ValidationMessageFor(model => model.DisplayOrder)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.AllowCustomerReviews):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.AllowCustomerReviews)
            @Html.ValidationMessageFor(model => model.AllowCustomerReviews)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.ProductTags):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.ProductTags)
            @Html.ValidationMessageFor(model => model.ProductTags)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Sku):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Sku)
            @Html.ValidationMessageFor(model => model.Sku)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.ManufacturerPartNumber):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.ManufacturerPartNumber)
            @Html.ValidationMessageFor(model => model.ManufacturerPartNumber)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Gtin):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Gtin)
            @Html.ValidationMessageFor(model => model.Gtin)
        </td>
    </tr>
</table>
<table class="adminContent" id="group-prices">
    <tr class="adminSeparator">
        <td colspan="2">
            <hr />
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Price):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Price) [@Model.PrimaryStoreCurrencyCode]
            @Html.ValidationMessageFor(model => model.Price)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.OldPrice):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.OldPrice) [@Model.PrimaryStoreCurrencyCode]
            @Html.ValidationMessageFor(model => model.OldPrice)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.ProductCost):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.ProductCost) [@Model.PrimaryStoreCurrencyCode]
            @Html.ValidationMessageFor(model => model.ProductCost)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.SpecialPrice):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.SpecialPrice) [@Model.PrimaryStoreCurrencyCode]
            @Html.ValidationMessageFor(model => model.SpecialPrice)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.SpecialPriceStartDateTimeUtc):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.SpecialPriceStartDateTimeUtc)
            @Html.ValidationMessageFor(model => model.SpecialPriceStartDateTimeUtc)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.SpecialPriceEndDateTimeUtc):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.SpecialPriceEndDateTimeUtc)
            @Html.ValidationMessageFor(model => model.SpecialPriceEndDateTimeUtc)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.DisableBuyButton):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.DisableBuyButton)
            @Html.ValidationMessageFor(model => model.DisableBuyButton)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.DisableWishlistButton):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.DisableWishlistButton)
            @Html.ValidationMessageFor(model => model.DisableWishlistButton)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.AvailableForPreOrder):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.AvailableForPreOrder)
            @Html.ValidationMessageFor(model => model.AvailableForPreOrder)
        </td>
    </tr>
    <tr id="pnlPreOrderAvailabilityStartDateTimeUtc">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.PreOrderAvailabilityStartDateTimeUtc):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.PreOrderAvailabilityStartDateTimeUtc)
            @Html.ValidationMessageFor(model => model.PreOrderAvailabilityStartDateTimeUtc)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.CallForPrice):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.CallForPrice)
            @Html.ValidationMessageFor(model => model.CallForPrice)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.CustomerEntersPrice):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.CustomerEntersPrice)
            @Html.ValidationMessageFor(model => model.CustomerEntersPrice)
        </td>
    </tr>
    <tr id="pnlMinimumCustomerEnteredPrice">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.MinimumCustomerEnteredPrice):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.MinimumCustomerEnteredPrice) [@Model.PrimaryStoreCurrencyCode]
            @Html.ValidationMessageFor(model => model.MinimumCustomerEnteredPrice)
        </td>
    </tr>
    <tr id="pnlMaximumCustomerEnteredPrice">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.MaximumCustomerEnteredPrice):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.MaximumCustomerEnteredPrice) [@Model.PrimaryStoreCurrencyCode]
            @Html.ValidationMessageFor(model => model.MaximumCustomerEnteredPrice)
        </td>
    </tr>
</table>
<table class="adminContent" id="group-required-other-products">
    <tr class="adminSeparator">
        <td colspan="2">
            <hr />
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.RequireOtherProducts):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.RequireOtherProducts)
            @Html.ValidationMessageFor(model => model.RequireOtherProducts)
        </td>
    </tr>
    <tr id="pnlRequiredProductIds">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.RequiredProductIds):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.RequiredProductIds)
            @Html.ValidationMessageFor(model => model.RequiredProductIds)
            <span id="required-products-check-progress" style="display: none;" class="please-wait">@T("Common.Wait...")</span>
            <input type="submit" id="btnAddNewRequiredProduct" value="@T("Admin.Catalog.Products.Fields.RequiredProductIds.AddNew")" onclick="javascript:OpenWindow('@(Url.Action("RequiredProductAddPopup", "Product", new { btnId = "btnRefreshRequiredProducts", productIdsInput = "RequiredProductIds" }))', 800, 800, true); return false;" class="k-button" />
            <input type="submit" id="btnRefreshRequiredProducts" style="display: none" />
            <script type="text/javascript">
                $(document).ready(function () {
                    $('#btnRefreshRequiredProducts').click(function () {
                        //refresh product list
                        loadRequiredProductFriendlyNames();

                        //return false to don't reload a page
                        return false;
                    });
                });
            </script>
            <span id="required-product-names" class="required-product-names"></span>
        </td>
    </tr>
    <tr id="pnlAutomaticallyAddRequiredProducts">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.AutomaticallyAddRequiredProducts):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.AutomaticallyAddRequiredProducts)
            @Html.ValidationMessageFor(model => model.AutomaticallyAddRequiredProducts)
        </td>
    </tr>
</table>
<table class="adminContent" id="group-giftcard">
    <tr class="adminSeparator">
        <td colspan="2">
            <hr />
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.IsGiftCard):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.IsGiftCard)
            @Html.ValidationMessageFor(model => model.IsGiftCard)
        </td>
    </tr>
    <tr id="pnlGiftCardType">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.GiftCardTypeId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.GiftCardTypeId, ((GiftCardType)Model.GiftCardTypeId).ToSelectList())
            @Html.ValidationMessageFor(model => model.GiftCardTypeId)
        </td>
    </tr>
</table>
<table class="adminContent" id="group-downloads">
    <tr class="adminSeparator">
        <td colspan="2">
            <hr />
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.IsDownload):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.IsDownload)
            @Html.ValidationMessageFor(model => model.IsDownload)
        </td>
    </tr>
    <tr id="pnlDownloadFile">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.DownloadId):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.DownloadId)
            @Html.ValidationMessageFor(model => model.DownloadId)
        </td>
    </tr>
    <tr id="pnlUnlimitedDownloads">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.UnlimitedDownloads):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.UnlimitedDownloads)
            @Html.ValidationMessageFor(model => model.UnlimitedDownloads)
        </td>
    </tr>
    <tr id="pnlMaxNumberOfDownloads">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.MaxNumberOfDownloads):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.MaxNumberOfDownloads)
            @Html.ValidationMessageFor(model => model.MaxNumberOfDownloads)
        </td>
    </tr>
    <tr id="pnlDownloadExpirationDays">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.DownloadExpirationDays):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.DownloadExpirationDays)
            @Html.ValidationMessageFor(model => model.DownloadExpirationDays)
        </td>
    </tr>
    <tr id="pnlDownloadActivationType">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.DownloadActivationTypeId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.DownloadActivationTypeId, ((DownloadActivationType)Model.DownloadActivationTypeId).ToSelectList())
            @Html.ValidationMessageFor(model => model.DownloadActivationTypeId)
        </td>
    </tr>
    <tr id="pnlHasUserAgreement">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.HasUserAgreement):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.HasUserAgreement)
            @Html.ValidationMessageFor(model => model.HasUserAgreement)
        </td>
    </tr>
    <tr id="pnlUserAgreementText">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.UserAgreementText):
        </td>
        <td class="adminData">
            @Html.TextAreaFor(model => model.UserAgreementText)
            @Html.ValidationMessageFor(model => model.UserAgreementText)
        </td>
    </tr>
    <tr id="pnlHasSampleDownload">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.HasSampleDownload):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.HasSampleDownload)
            @Html.ValidationMessageFor(model => model.HasSampleDownload)
        </td>
    </tr>
    <tr id="pnlSampleDownloadFile">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.SampleDownloadId):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.SampleDownloadId)
            @Html.ValidationMessageFor(model => model.SampleDownloadId)
        </td>
    </tr>
</table>
<table class="adminContent" id="group-recurring">
    <tr class="adminSeparator">
        <td colspan="2">
            <hr />
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.IsRecurring):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.IsRecurring)
            @Html.ValidationMessageFor(model => model.IsRecurring)
        </td>
    </tr>
    <tr id="pnlCycleLength">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.RecurringCycleLength):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.RecurringCycleLength)
            @Html.ValidationMessageFor(model => model.RecurringCycleLength)
        </td>
    </tr>
    <tr id="pnlCyclePeriod">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.RecurringCyclePeriodId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.RecurringCyclePeriodId, ((RecurringProductCyclePeriod)Model.RecurringCyclePeriodId).ToSelectList())
            @Html.ValidationMessageFor(model => model.RecurringCyclePeriodId)
        </td>
    </tr>
    <tr id="pnlTotalCycles">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.RecurringTotalCycles):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.RecurringTotalCycles)
            @Html.ValidationMessageFor(model => model.RecurringTotalCycles)
        </td>
    </tr>
</table>
<table class="adminContent" id="group-rental">
    <tr class="adminSeparator">
        <td colspan="2">
            <hr />
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.IsRental):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.IsRental)
            @Html.ValidationMessageFor(model => model.IsRental)
        </td>
    </tr>
    <tr id="pnlRentalPriceLength">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.RentalPriceLength):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.RentalPriceLength)
            @Html.ValidationMessageFor(model => model.RentalPriceLength)
        </td>
    </tr>
    <tr id="pnlRentalPricePeriod">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.RentalPricePeriodId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.RentalPricePeriodId, ((RentalPricePeriod)Model.RentalPricePeriodId).ToSelectList())
            @Html.ValidationMessageFor(model => model.RentalPricePeriodId)
        </td>
    </tr>
</table>
<table class="adminContent" id="group-shipping">
    <tr class="adminSeparator">
        <td colspan="2">
            <hr />
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.IsShipEnabled):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.IsShipEnabled)
            @Html.ValidationMessageFor(model => model.IsShipEnabled)
        </td>
    </tr>
    <tr id="pnlFreeShipping">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.IsFreeShipping):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.IsFreeShipping)
            @Html.ValidationMessageFor(model => model.IsFreeShipping)
        </td>
    </tr>
    <tr id="pnlShipSeparately">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.ShipSeparately):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.ShipSeparately)
            @Html.ValidationMessageFor(model => model.ShipSeparately)
        </td>
    </tr>
    <tr id="pnlAdditionalShippingCharge">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.AdditionalShippingCharge):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.AdditionalShippingCharge) [@Model.PrimaryStoreCurrencyCode]
            @Html.ValidationMessageFor(model => model.AdditionalShippingCharge)
        </td>
    </tr>
    <tr id="pnlWeight">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Weight):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Weight) [@Model.BaseWeightIn]
            @Html.ValidationMessageFor(model => model.Weight)
        </td>
    </tr>
    <tr id="pnlLength">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Length):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Length) [@Model.BaseDimensionIn]
            @Html.ValidationMessageFor(model => model.Length)
        </td>
    </tr>
    <tr id="pnlWidth">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Width):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Width) [@Model.BaseDimensionIn]
            @Html.ValidationMessageFor(model => model.Width)
        </td>
    </tr>
    <tr id="pnlHeight">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Height):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Height) [@Model.BaseDimensionIn]
            @Html.ValidationMessageFor(model => model.Height)
        </td>
    </tr>
    <tr id="pnlDeliveryDate">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.DeliveryDateId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.DeliveryDateId, Model.AvailableDeliveryDates)
            @Html.ValidationMessageFor(model => model.DeliveryDateId)
        </td>
    </tr>
</table>
<table class="adminContent" id="group-tax">
    <tr class="adminSeparator">
        <td colspan="2">
            <hr />
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.IsTaxExempt):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.IsTaxExempt)
            @Html.ValidationMessageFor(model => model.IsTaxExempt)
        </td>
    </tr>
    <tr id="pnlTaxCategory">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.TaxCategoryId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.TaxCategoryId, Model.AvailableTaxCategories)
            @Html.ValidationMessageFor(model => model.TaxCategoryId)
        </td>
    </tr>
    <tr id="pnlIsTelecommunicationsOrBroadcastingOrElectronicServices">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.IsTelecommunicationsOrBroadcastingOrElectronicServices):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.IsTelecommunicationsOrBroadcastingOrElectronicServices)
            @Html.ValidationMessageFor(model => model.IsTelecommunicationsOrBroadcastingOrElectronicServices)
        </td>
    </tr>
</table>
<table class="adminContent" id="group-inventory">
    <tr class="adminSeparator">
        <td colspan="2">
            <hr />
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.ManageInventoryMethodId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.ManageInventoryMethodId, ((ManageInventoryMethod)Model.ManageInventoryMethodId).ToSelectList())
            @Html.ValidationMessageFor(model => model.ManageInventoryMethodId)
        </td>
    </tr>
    <tr id="pnlUseMultipleWarehouses">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.UseMultipleWarehouses):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.UseMultipleWarehouses)
            @Html.ValidationMessageFor(model => model.UseMultipleWarehouses)
        </td>
    </tr>
    <tr id="pnlWarehouse">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.WarehouseId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.WarehouseId, Model.AvailableWarehouses)
            @Html.ValidationMessageFor(model => model.WarehouseId)
        </td>
    </tr>
    <tr id="pnlMultipleWarehouses">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.ProductWarehouseInventoryModels):
        </td>
        <td class="adminData">
            @if (Model.ProductWarehouseInventoryModels.Count > 0)
            {
                <table class="tablestyle" border="1" cellspacing="0" style="width: 600px; border-collapse: collapse;">
                    <thead>
                        <tr class="headerstyle">
                            <th>
                                @T("Admin.Catalog.Products.ProductWarehouseInventory.Fields.Warehouse")
                            </th>
                            <th align="center">
                                @T("Admin.Catalog.Products.ProductWarehouseInventory.Fields.WarehouseUsed")
                            </th>
                            <th align="center">
                                @T("Admin.Catalog.Products.ProductWarehouseInventory.Fields.StockQuantity")
                            </th>
                            <th align="center">
                                @T("Admin.Catalog.Products.ProductWarehouseInventory.Fields.ReservedQuantity")
                            </th>
                            <th align="center">
                                @T("Admin.Catalog.Products.ProductWarehouseInventory.Fields.PlannedQuantity")
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var item in Model.ProductWarehouseInventoryModels)
                        {
                            <tr>
                                <td style="width: 40%;">
                                    <div style="padding-left: 10px; padding-right: 10px;">
                                        @item.WarehouseName
                                    </div>
                                </td>
                                <td align="center" style="width: 10%;">
                                    <input type="checkbox" id="warehouse_used_@(item.WarehouseId)" name="warehouse_used_@(item.WarehouseId)" value="@item.WarehouseId" checked="@item.WarehouseUsed" />
                                    <script type="text/javascript">
                                        $(document).ready(function () {
                                            $("#warehouse_used_@(item.WarehouseId)").change(toggleWarehouseUsed_@(item.WarehouseId));
                                            toggleWarehouseUsed_@(item.WarehouseId)();
                                        });
                                        function toggleWarehouseUsed_@(item.WarehouseId)() {
                                            if ($('#warehouse_used_@(item.WarehouseId)').is(':checked')) {
                                                $('#warehouse_qty_@(item.WarehouseId)').prop('disabled', false);
                                                $('#warehouse_reserved_@(item.WarehouseId)').prop('disabled', false);
                                            }
                                            else {
                                                $('#warehouse_qty_@(item.WarehouseId)').prop('disabled', true);
                                                $('#warehouse_reserved_@(item.WarehouseId)').prop('disabled', true);
                                            }
                                        }
                                    </script>
                                </td>
                                <td align="center" style="width: 20%;">
                                    <input id="warehouse_qty_@(item.WarehouseId)" name="warehouse_qty_@(item.WarehouseId)" type="text" value="@item.StockQuantity" class="adminInput" style="width:70px;" />
                                </td>
                                <td align="center" style="width: 20%;">
                                    <input id="warehouse_reserved_@(item.WarehouseId)" name="warehouse_reserved_@(item.WarehouseId)" type="text" value="@item.ReservedQuantity" class="adminInput" style="width:70px;" />
                                </td>
                                <td align="center" style="width: 10%;">
                                    @item.PlannedQuantity
                                </td>
                            </tr>
                        }
                    </tbody>
                </table>
                <p>
                    <em>@T("Admin.Catalog.Products.ProductWarehouseInventory.Description1")</em>
                </p>
                <p>
                    <em>@T("Admin.Catalog.Products.ProductWarehouseInventory.Description2")</em>
                </p>
                <p>
                    <em>@T("Admin.Catalog.Products.ProductWarehouseInventory.Description3")</em>
                </p>
            }
            else
            {
                @T("Admin.Catalog.Products.ProductWarehouseInventory.Fields.Warehouse.NotDefined")
            }
        </td>
    </tr>
    <tr id="pnlStockQuantity">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.StockQuantity):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.StockQuantity)
            @Html.ValidationMessageFor(model => model.StockQuantity)
        </td>
    </tr>
    <tr id="pnlDisplayStockAvailability">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.DisplayStockAvailability):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.DisplayStockAvailability)
            @Html.ValidationMessageFor(model => model.DisplayStockAvailability)
        </td>
    </tr>
    <tr id="pnlDisplayStockQuantity">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.DisplayStockQuantity):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.DisplayStockQuantity)
            @Html.ValidationMessageFor(model => model.DisplayStockQuantity)
        </td>
    </tr>
    <tr id="pnlMinStockQuantity">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.MinStockQuantity):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.MinStockQuantity)
            @Html.ValidationMessageFor(model => model.MinStockQuantity)
        </td>
    </tr>
    <tr id="pnlLowStockActivity">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.LowStockActivityId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.LowStockActivityId, ((LowStockActivity)Model.LowStockActivityId).ToSelectList())
            @Html.ValidationMessageFor(model => model.LowStockActivityId)
        </td>
    </tr>
    <tr id="pnlNotifyForQuantityBelow">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.NotifyAdminForQuantityBelow):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.NotifyAdminForQuantityBelow)
            @Html.ValidationMessageFor(model => model.NotifyAdminForQuantityBelow)
        </td>
    </tr>
    <tr id="pnlBackorders">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.BackorderModeId):
        </td>
        <td class="adminData">
            @Html.DropDownListFor(model => model.BackorderModeId, ((BackorderMode)Model.BackorderModeId).ToSelectList())
            @Html.ValidationMessageFor(model => model.BackorderModeId)
        </td>
    </tr>
    <tr id="pnlAllowBackInStockSubscriptions">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.AllowBackInStockSubscriptions):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.AllowBackInStockSubscriptions)
            @Html.ValidationMessageFor(model => model.AllowBackInStockSubscriptions)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.OrderMinimumQuantity):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.OrderMinimumQuantity)
            @Html.ValidationMessageFor(model => model.OrderMinimumQuantity)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.OrderMaximumQuantity):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.OrderMaximumQuantity)
            @Html.ValidationMessageFor(model => model.OrderMaximumQuantity)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.AllowedQuantities):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.AllowedQuantities)
            @Html.ValidationMessageFor(model => model.AllowedQuantities)
        </td>
    </tr>
    <tr id="pnlAllowAddingOnlyExistingAttributeCombinations">
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.AllowAddingOnlyExistingAttributeCombinations):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.AllowAddingOnlyExistingAttributeCombinations)
            @Html.ValidationMessageFor(model => model.AllowAddingOnlyExistingAttributeCombinations)
        </td>
    </tr>
</table>
<table class="adminContent">
    <tr class="adminSeparator">
        <td colspan="2">
            <hr />
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.AvailableStartDateTimeUtc):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.AvailableStartDateTimeUtc)
            @Html.ValidationMessageFor(model => model.AvailableStartDateTimeUtc)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.AvailableEndDateTimeUtc):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.AvailableEndDateTimeUtc)
            @Html.ValidationMessageFor(model => model.AvailableEndDateTimeUtc)
        </td>
    </tr>
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.Published):
        </td>
        <td class="adminData">
            @Html.EditorFor(model => model.Published)
            @Html.ValidationMessageFor(model => model.Published)
        </td>
    </tr>
    @if (Model.CreatedOn.HasValue)
    {
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CreatedOn):
            </td>
            <td class="adminData">
                @Model.CreatedOn.Value.ToString("F")
            </td>
        </tr>
    }
    @if (Model.UpdatedOn.HasValue)
    {
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.UpdatedOn):
            </td>
            <td class="adminData">
                @Model.UpdatedOn.Value.ToString("F")
            </td>
        </tr>
    }
</table>
